package cn.blnp.net.flowable.listen.exec;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.delegate.DelegateExecution;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * <h3></h3>
 *
 * @author <a href="mailto:blnp.yibin@qq.com">lyb</a>
 * @version 1.0
 * @since 2025/5/21 11:14
 */
@Slf4j
@Component("myProcessExecutionListenerBean")
public class MyProcessExecutionListenerBean implements Serializable {

    public void printInfo(DelegateExecution execution) {
        log.info("============通过expression指定的监听器开始============");
        String activityId = execution.getCurrentActivityId();
        String eventName = execution.getEventName();
        log.info("事件名称:" + eventName);
        log.info("activityId:" + activityId);
        log.info("============通过expression指定的监听器结束============");
    }
}
